package com.jieshuibao.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jieshuibao.mapper.PolicyRelatedMapper;
import com.jieshuibao.model.db.PolicyRelated;
import com.jieshuibao.model.db.PolicyRelatedExample;

@Service
public class PolicyRelatedService{
	
	@Resource
	private PolicyRelatedMapper policyRelatedMapper;
	
	public void addPolicyRelated(PolicyRelated policyRelated) {
		policyRelatedMapper.insertSelective(policyRelated);
	}
	
	public void delPolicyRelatedByUuid(String uuid) {
		policyRelatedMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updatePolicyRelated(PolicyRelated policyRelated) {
		policyRelatedMapper.updateByPrimaryKeySelective(policyRelated);
	}
	
	public PolicyRelated getPolicyRelatedByUuid(String uuid) {
		return policyRelatedMapper.selectByPrimaryKey(uuid);
	}
	
	public List<PolicyRelated> getPagePolicyRelated(PolicyRelatedExample policyRelatedExample) {
		return policyRelatedMapper.selectPage(policyRelatedExample);
	}
	
	public List<PolicyRelated> getPolicyRelateds(PolicyRelatedExample policyRelatedExample) {
		return policyRelatedMapper.selectByExample(policyRelatedExample);
	}
	
	public int countPolicyRelated(PolicyRelatedExample policyRelatedExample) {
		return policyRelatedMapper.countByExample(policyRelatedExample);
	}
}
